﻿#!/bin/bash

IP=`ifconfig $1 | grep "inet addr" | gawk -F: '{print $2}' | gawk '{print $1}'`
echo $IP
IP=`grep IPADDR /etc/sysconfig/network-scripts/ifcfg-eth0 |awk -F= '{print $2}'`
echo $IP
IP=` ifconfig eth0 |grep "inet addr" |awk '{print $2}' |awk -F: '{print $2}'`
echo $IP

PWD="hwtest"
#PWD="eLaStIx.2oo7"

TABLE="iax"
MYSQL="mysql -u root -p"$PWD
$MYSQL -e "use asterisk; select * from "$TABLE";"
